<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":"
            + request.getServerPort() + path + "/";
%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="zh-CN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<base href="<%=basePath%>">

   <!--  <link rel="icon" href="resources/img/favicon.ico" type="image/x-icon"> -->

    <link href="resources/css/back/bootstrap.min.css" rel="stylesheet">
    <script src="resources/js/jquery.min.js"></script>
    <script src="resources/js/bootstrap.min.js"></script>
    <script src="resources/js/base.js"></script>
    <title>C++轻松入门</title>
</head>
	<div id="header">
		<%@ include file="common/navbar.jsp"%>
	</div>
	<br>
	<c:if test="${not empty student}"><h4>欢迎您:<span  class="label label-primary">${student.username}</span></h4></c:if>	
	<c:if test="${not empty tip_error }"><strong>${tip_error }</strong></c:if>
 <div class="am-g">
  <div class="am-u-md-8 am-u-sm-centered">
    <form class="am-form" action="student/register" method="post" data-am-validator>
      <fieldset class="am-form-set">
    <legend>密码验证</legend>
    <div class="am-form-group">
      <label for="doc-vld-name-2">用户名：</label>
      <input type="text" id="doc-vld-name-2" minlength="3"  name="username"
             placeholder="输入用户名（至少 3 个字符）" required/>
    </div>

    <div class="am-form-group">
      <label for="doc-vld-pwd-1">密码：</label>
      <input type="password" id="doc-vld-pwd-1" placeholder="6 位数字的银行卡密码" minlength="6" required/>
    </div>

    <div class="am-form-group">
      <label for="doc-vld-pwd-2">确认密码：</label>
      <input type="password" id="doc-vld-pwd-2"  name="password" placeholder="请与上面输入的值一致" data-equal-to="#doc-vld-pwd-1" required/>
    </div>
   <div class="am-form-group">
      <label for="doc-vld-pwd-1">手机号：</label>
      <input type="text" id="doc-vld-pwd-1" name="mobile" placeholder="6 位数字的银行卡密码" minlength="6" required/>
    </div>
       <div class="am-form-group">
      <label for="doc-vld-pwd-1">邮箱：</label>
      <input type="email"  name="email" placeholder="邮箱"  required/>
    </div>
       <div class="am-form-group">
      <label for="doc-vld-pwd-1">姓名：</label>
      <input type="text"  name="name" placeholder="姓名" minlength="2" required/>
    </div>
    <div class="am-form-group">
          <select id="select" onchange="changeAction()";>
        <option value="student/register">学生</option>
        <option value="teacher/register">教师</option>
      </select>
           <span class="am-form-caret"></span>
           </div>
       <button type="submit" class="am-btn am-btn-primary am-btn-block">注册</button>
  </fieldset>
    </form>
      已经注册了，<a href="loginview">登录</a>
  </div>
</div>

<script type="text/javascript">
function changeAction(){
var selectValue=document.getElementById('select').value;
document.forms[0].action=selectValue;
}
</script>
</body>
</html>